package com.example.demo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Res {
    private Integer A;
    private Integer B;
    private Integer C;

    public boolean sort(Res request){
        if (A>=request.getA()&&B>=request.getB()&&C>=request.getC()){
            return true;
        }else {
            return false;
        }
    }

    public Res minus(Res work, Res request) {
        this.A=work.getA()-request.getA();
        this.B=work.getB()-request.getB();
        this.C=work.getC()-request.getC();
        return this;
    }
    public Res puls(Res Allocation, Res request){
        this.A=Allocation.getA()+request.getA();
        this.B=Allocation.getB()+request.getB();
        this.C=Allocation.getC()+request.getC();
        return this;
    }
}
